{block name="style"}
{/block}
{block name="content"}
<form class="layui-form" action="{:url('/wms/recv/borrow_recv')}" method="post" id="borrow-recv">
    <input type="hidden" name="borrow_id" value="{$borrow.borrow_id}">
    <div class="info-header">
        <div class="layui-row">
            <div class="layui-col-xs3">
                <label class="layui-form-label">借用仓库</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.wout.name}" disabled class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">借用单号</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.borrow_sn}" disabled class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">借用日期</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.borrow_date}" disabled class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">出库日期</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.out_date}" disabled class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs3">
                <label class="layui-form-label">借用人</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.user.nickname}" disabled class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs3">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" value="{$borrow.remark}" disabled class="layui-input">
                </div>
            </div>
        </div>
    </div>
    <div class="info-body">
        <div class="layui-row" style="margin-top: 30px;">
            <h2>商品详情</h2>
            <table class="layui-table text-center">
                <thead>
                <tr>
                    <th>图片</th>
                    <th>产品名称</th>
                    <th>SKU</th>
                    <th>借用数量</th>
                    <th>退还数量</th>
                    <th>备注</th>
                </tr>
                </thead>
                <tbody>
                {foreach $borrow->info as $info}
                <tr>
                    <td width="100"><img src="{$info.image_url}"></td>
                    <td>{$info.store.product.name_ch}</td>
                    <td class="text-left">
                        {$info.sku}
                        <input type="hidden" name="sku[]" value="{$info.sku}">
                    </td>
                    <td>
                        {$info.qty}
                        <input type="hidden" name="qty[]" value="{$info.qty}">
                    </td>
                    <td><input type="number" name="in_qty[]" value="{$info.qty}" class="layui-input"></td>
                    <td>{$info.remark}</td>
                </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>
</form>
{/block}
{block name="script"}
{/block}